import HTMLTestRunner_cn,yagmail,pytest



class Tools():
    def BaoGao(self):
        baogao = HTMLTestRunner_cn.HTMLTestRunner(open('jd.html'),title='jd测试报告',description='jd测试报告')
        return baogao


    def Email(self):
        email = yagmail.SMTP(user="3484055372@qq.com",password='uzepywemurpxcigg',host='smtp.qq.com')
        email.send(to='3484055372@qq.com',subject='测试邮件',contents=["测试邮件 ./jd.html"])




if __name__ == '__main__':
    pytest.main([r"E:\Auto_Wms\UI_web_jd\case\test_001.py","-s",'--html=jd.html'])
    Tools().BaoGao()
    Tools().Email()